<?php
/**
 * @author Thibaut Cromphaut, Gaïtano Boeraeve, Mathias Helin, Dimitry Dierickx
 * @copyright  Copyright (c) 2011 Artevelde University College Ghent 
 */

class Application_Form_Login extends Zend_Form
{
    public function init()
    {
        $this->addElement('text', 'email', array(
            'label'      => 'Emailaddress',
            'required'   => true,
            'filters'    => array('StringTrim'),
            'validators' => array('EmailAddress'),
        ));
        
        $this->addElement('password', 'password', array(
            'label'      => 'Password',
            'required'   => true,
            'filters'    => array('StringTrim'),
        ));
        
        $this->addElement('submit', 'login', array(
            'label'      => 'Login',
        ));
        
        $this->addElement('hash', 'no_csrf_login', array(
            'salt' => 'unique',
        ));
        
        $this->setDecorators(array(
            'FormElements',
            array('Description', array('placement' => 'prepend')),
            'Form'
        ));
    }
}